<template>
  <!-- 右侧窗口 -->
  <div class="right-drawer">
    <keep-alive>
      <node-perspective v-if="drawerType === 'perspective'" />
    </keep-alive>
    <keep-alive>
      <visual-favorite
        v-if="drawerType === 'favorite'"
        :drawer-type="drawerType"
      />
    </keep-alive>
  </div>
</template>

<script lang="ts">
import Vue from 'vue'
import Component from 'vue-class-component'
import NodePerspective from '@/components/studio/data/drawer/NodePerspective.vue'
import VisualFavorite from '@/components/studio/data/drawer/VisualFavorite.vue'
import { Prop } from 'vue-property-decorator'

@Component({
  components: { NodePerspective, VisualFavorite },
})
export default class RightDrawer extends Vue {
  @Prop({
    type: String,
    default: '',
  })
  drawerType!: string
}
</script>

<style lang="less" scoped>
.right-drawer {
  height: 100%;
}
</style>
